package dhcpha.clinical.adapter;

import java.util.ArrayList;
import java.util.HashMap;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import dhcpha.clinical.activity.R;

public class StatusListAdapter extends BaseAdapter{
	private LayoutInflater inflater;
    private ArrayList<HashMap<String, String>> list;
    public StatusListAdapter(Context context, ArrayList<HashMap<String, String>> list) {
		super();
		this.inflater=LayoutInflater.from(context);
		this.list = list;
	}

	
	
	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		if (convertView==null) {
			convertView=inflater.inflate(R.layout.item_dropdown_listview, null);
		}
		TextView popItemText=(TextView)convertView.findViewById(R.id.pop_item_text);
		
          popItemText.setText(list.get(position).get("Desc"));
                  

		return convertView;
	}

}
